﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace ISSMoviePlex.Service
{
    [ServiceContract]
    public interface ITicketBookingService
    {
        [OperationContract]
        ScheduleCollection GetSchedules(string movieName);

        [OperationContract]
        void BookTicket(int noOfTicketsBooking, int scheduleId, int memberId);
    }

    [CollectionDataContract]
    public class ScheduleCollection : List<Schedule>
    {

    }

    [DataContract]
    public class Schedule
    {
        [DataMember]
        public int ScheduleId { get; set; }
        [DataMember]
        public int SeatAvailable { get; set; }
        [DataMember]
        public int MovieId { get; set; }
        [DataMember]
        public DateTime ShowTime { get; set; }
    }
}
